Components › Forms & input › Date & time › Date-time range

Date-time range

canon

Start and end with time, all-day toggle and duration presets.

M4c (owner 28 Sep 2026, approved): all-day renders the canonical DateRangeField (from–to in one field, shared calendar, day count) instead of two DateFields with their own day arithmetic — one shape for a range of days; `.dp-field.range` ends share the field width (width 0 + flex 1), so the term row no longer overflows on 390 px (acrm branch feat/celodenni-rozsah). acrm !4087 (28 Sep 2026, owner): the visible duration next to times uses `fmtDurShort` — „45 m“ · „1 h“ · „1 h 30 m“ (in the context of time „m“ = minutes). Screen readers keep the full „min“ via `fmtDur` (TimeField option aria-label, DateTimeRange hidden live text) so „m“ is not read as metres. Other durations in the app (timeline, Setkání, tasks, reminders) keep „min“.

Used in 3 files · 3 areas · 3× — components/calendar, components/meetings, pages/ZasedackyPage

Default

–
1 h
Celý den
9:00 až 10:00, 1 h
components--date-time-range--defaultOpen standalone ↗Code

Variants

–
1 h
Celý den
9:00 až 10:00, 1 h
timed — date, from – to, duration
–
Celý den
all day — one date, no times
–
3 dny
Celý den
all day, multi-day — end date + day count
–
4 h · přes půlnoc
Celý den
22:00 až 2:00, 4 h, přes půlnoc
overnight (allowOvernight) — end before start rolls to the next day
components--date-time-range--variantsOpen standalone ↗Code

States

–
1 h
Celý den
Všichni mají volno
9:00 až 10:00, 1 h
availability — free (.dp-status.ok)
–
1 h
Celý den
Jana Nováková má schůzku
14:00 až 15:00, 1 h
availability — busy (.dp-status.busy)
–
4 h · přes půlnoc
Celý den
Konec je před začátkem — schůzka přes půlnoc není povolená.
22:00 až 2:00, 4 h, přes půlnoc
overnight not allowed — end before start is an error
–
1 h
9:00 až 10:00, 1 h
allowAllDay=false — meeting room, no toggle
–
Celý den
empty — no date, no times
components--date-time-range--statesOpen standalone ↗Code

Composition

–
45 m
Celý den
Zasedačka Praha je volná
9:00 až 9:45, 45 min
meeting dialog — Termín field, footer
components--date-time-range--compositionOpen standalone ↗Code